package com.sky.mapper;

import com.sky.dto.BlogDTO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface BlogLikeMapper {
    /**
     * 增加点赞表
     * @param blogDTO
     */
    @Insert("insert into game_forum.blog_like (blog_id, user_id) values (#{id},#{userId})")
    void addLikeCount(BlogDTO blogDTO);

    /**
     * 删除点赞表
     * @param blogDTO
     */
    @Delete("delete from game_forum.blog_like where user_id = #{userId} and blog_id =#{id}")
    void deleteLike(BlogDTO blogDTO);
}
